<!--<!DOCTYPE html>-->
<!--<html lang="en">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <title>Title</title>-->
<!--</head>-->
<!--<body>-->
<!--<div class="col-md-12">-->
<!--        <div class="box-item">-->
<!--            <script>$a = rand(1,16);</script>-->
<!--          <img src="__STATIC__/images/{$a=rand(1,16)}.jpg" style="width: 420px;height: 280px;" class="img-responsive"/>-->
<!--            <div class="content">-->
<!--                <h3>{$list.username}</h3>-->
<!--                <p>留言内容：{$list.content}</p>-->
<!--                <br><br>-->
<!--                <span>留言时间：{$list.update_time|date='Y年m月d日h时i分',###}</span><br>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->
<!--</body>-->
<!--</html>-->
<html>
<head>
    <!-- META DATA -->
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="">
    <meta name="author" content="">
    <title></title>

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="__STATIC__/css/bootstrap.min.css"  type="text/css">

    <!-- Owl Carousel Assets -->
    <link href="__STATIC__/owl-carousel/owl.carousel.css" rel="stylesheet">
    <!-- <link href="owl-carousel/owl.theme.css" rel="stylesheet"> -->

    <!-- Custom CSS -->
    <link rel="stylesheet" href="__STATIC__/css/style.css">

    <!-- Custom Fonts -->
    <link rel="stylesheet" href="__STATIC__/font-awesome-4.4.0/css/font-awesome.min.css"  type="text/css">
    <!---<link href='http://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>--->

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="__STATIC__/js/html5shiv.js"></script>
    <script src="__STATIC__/js/respond.min.js"></script>
    <![endif]-->

</head>

<body class="sub-page">
<!-- /////////////////////////////////////////Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <h4> <a class="navbar-brand page-scroll" href="{:url('index/index')}">留言板</a></h4>
        </div>

        <!--    {empty name='Think.session.username'}-->
        <!--    <a href="{:url('User/login')}">登录</a>-->
        <!--    <a href="{:url('User/register')}">注册</a>-->
        <!--    {else/}-->
        <!--    欢迎您：{$Think.session.username}&nbsp;&nbsp;-->
        <!--    <a class="page-scroll" href="{:url('index/post')}">发表留言</a>-->
        <!--    <a class="page-scroll" href="{:url('index/myinfo')}">查看我的留言</a>-->
        <!--    <a class="page-scroll" href="{:url('user/change_pwd')}">修改密码</a>-->
        <!--    <a class="page-scroll" href="{:url('User/logout')}">退出登录</a>-->
        <!--    {/empty}-->

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            {empty name='Think.session.username'}
            <ul class="nav navbar-nav navbar-right">

                <li>
                    <a class="page-scroll" href="{:url('user/login')}">登录</a>
                </li>
                <li>
                    <a class="page-scroll" href="{:url('user/login')}">注册</a>
                </li>
            </ul>
            {else/}
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a class="page-scroll">欢迎您：{$Think.session.username}&nbsp;&nbsp;</a>
                </li>
                <li>
                    <a class="page-scroll" href="{:url('index/post')}">发表留言</a>
                </li>
                <li>
                    <a class="page-scroll" href="{:url('index/myinfo')}">查看我的留言</a>
                </li>
                <li>
                    <a class="page-scroll" href="{:url('user/change_pwd')}">修改密码</a>
                </li>
                <li>
                    <a class="page-scroll" href="{:url('User/logout')}">退出登录</a>
                </li>
            </ul>
            {/empty}
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>
<!-- Navigation -->

<!-- Background Gradients-->
<div  class="site-gradients">
    <div class="site-gradients-media">
        <figure>
            <img src="Another%20Yosemite%20short%20movie%20project%20%E2%80%93%20Modern_files/PcLGXNjMTdiFVKTrElCl__DSC2245.jpg" alt="PcLGXNjMTdiFVKTrElCl__DSC2245" srcset="https://themedemos.webmandesign.eu/modern/wp-content/uploads/sites/8/2014/11/PcLGXNjMTdiFVKTrElCl__DSC2245.jpg 1920w, https://themedemos.webmandesign.eu/modern/wp-content/uploads/sites/8/2014/11/PcLGXNjMTdiFVKTrElCl__DSC2245-420x280.jpg 420w, https://themedemos.webmandesign.eu/modern/wp-content/uploads/sites/8/2014/11/PcLGXNjMTdiFVKTrElCl__DSC2245-744x497.jpg 744w, https://themedemos.webmandesign.eu/modern/wp-content/uploads/sites/8/2014/11/PcLGXNjMTdiFVKTrElCl__DSC2245-1200x801.jpg 1200w" sizes="(max-width: 1617px) 100vw, 1617px" height="1080" width="1617">
        </figure>
    </div>
</div>


<header class="container">
    <div class="site-branding">
        <h1 class="site-title">
            <a href="{:url('index/index')}">
                <span>留言板</span>
            </a>
        </h1>
        <h2 class="site-description">回复留言</h2>
    </div>
    <div class="social-links">
        <ul class="list-inline">
            <li><a href="#"><i class="fa fa-facebook"></i></a></li>
            <li><a href="#"><i class="fa fa-twitter"></i></a></li>
            <li><a href="#"><i class="fa fa-google-plus"></i></a></li>
            <li><a href="#"><i class="fa fa-vimeo"></i></a></li>
            <li><a href="#"><i class="fa fa-rss"></i></a></li>
        </ul>
    </div>
</header>

<!-- /////////////////////////////////////////Content -->
<div id="page-content">

    <div id="page-content">
        <section class="box-content box-1">
            <div class="container">

                <div class="row">
                    <div class="col-md-12">
                            <div class="box-item">
                                <script>$a = rand(1,16);</script>
                              <img src="__STATIC__/images/{$a=rand(1,16)}.jpg" class="img-responsive"/>
                                <div class="content">
                                    <h3>{$list.username}</h3>
                                    <p>留言内容：{$list.content}</p>
                                    <br><br>
                                    <span>留言时间：{$list.update_time|date='Y年m月d日h时i分',###}</span><br>
                                </div>
                                <hr/>
                                <div class="row">
                                    {volist name='list1' id='item'}
                                        <div class="box-item">
                                            <script>$a = rand(1,16);</script>
                                            <div class="content">
                                                <h5>{$item.username}</h5>
                                                <span>回复者:{$item.username}</span>
                                                <p>回复内容：{$item.answer}</p>
                                                <br><br>
                                                <span>留言时间：{$item.create_time|date='Y年m月d日h时i分',###}</span><br>
                                                {eq name='Think.session.username' value='$item.username'}
                                                <a href="{:url('delete_answer?id='.$item['answer_id'].'&mes_id='.$item['message_id'])}" onclick="return confirm('确定删除?')">删除</a>
                                                {/eq}
                                                <hr/>

                                            </div>
                                        </div>
                                    {/volist}
                                    <div class="box-item" align="center">
                                    {$list1->render()}
                                    </div>
                                </div>
                                </div>
                                <div class="box-item" style="border-radius: 25px;">
                                    <form name="form1" method="post" action="{:url('do_answer')}">
                                        <div class="row">
                                            <div class="col-md-12" >
                                                <div class="form-group">
													<textarea name="content" id="answer" class="form-control" rows="5" cols="25" required="required"
                                                              placeholder="Message" style="height: 210px;border-radius: 25px 25px 0px 0px;"></textarea>
                                                </div>
                                                <input type="hidden" name="message_id"  value={$list.message_id} style="display:none">
                                                <button type="submit" class="btn btn-skin btn-block" name="submitcontact" id="submitcontact" style="border-radius: 0px 0px 25px 25px ;">Submit</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>